﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Maintain.aspx.cs" Inherits="PMS.Web.Maintain" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="css/grouplist.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">

        //显示
        function showContentDiv(t) {
            if (t == "1") {
                $("#tb_AddRole").show();
            }
            else {
                $("#tb_AddRole").hide();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hid_ProjectID" runat="server" Value="0" />
    <asp:HiddenField ID="hid_ID" runat="server" Value="0" />
    <div style="width: 98%;">
        <table width="100%">
            <tr>
                <td align="right" style="width: 120px;">
                    项目类型：
                </td>
                <td align="left">
                    <asp:Label ID="lab_ProjectType" ForeColor="Red" runat="server" Text=""></asp:Label>
                </td>
                <td align="right" style="width: 100px;">
                    工程编号：
                </td>
                <td align="left">
                    <asp:Label ID="lab_ProjectID" ForeColor="Red" runat="server" Text=""></asp:Label>
                </td>
                <td align="right" style="width: 100px;">
                    JDE号：
                </td>
                <td align="left">
                    <asp:Label ID="lab_JDEID" ForeColor="Red" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    城市：
                </td>
                <td>
                    <asp:Label ID="lab_City" ForeColor="Red" runat="server"></asp:Label>
                </td>
                <td align="right">
                    项目名称：
                </td>
                <td colspan="3">
                    <asp:Label ID="lab_ProjectName" ForeColor="Red" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    系统安装地址：
                </td>
                <td>
                    <asp:Label ID="lab_SystemPath" ForeColor="Red" runat="server"></asp:Label>
                </td>
                <td align="right">
                    客户联系人：
                </td>
                <td>
                    <asp:Label ID="lab_Customer" ForeColor="Red" runat="server"></asp:Label>
                </td>
                <td align="right">
                    联系电话：
                </td>
                <td>
                    <asp:Label ID="lab_CustomerTel" ForeColor="Red" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
        <img src="image/mainpage_line.jpg" style="margin: 5px 0px 5px 0px;" />
        <table id="tb_AddRole" style="width: 100%; display: none;">
            <tr>
                <td align="right">
                    季度安排
                </td>
                <td align="left">
                    <asp:TextBox ID="txt_Quarter" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    计划日期
                </td>
                <td align="left">
                    <asp:TextBox ID="txt_PlanDate" class="Wdate" onfocus="WdatePicker()" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    完成日期
                </td>
                <td align="left">
                    <asp:TextBox ID="txt_CompleteDate" runat="server" class="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    巡检结果
                </td>
                <td colspan="3" align="left">
                    <asp:TextBox ID="txt_Description" runat="server" Width="90%" TextMode="MultiLine"></asp:TextBox>
                </td>
                <td align="right">
                    附件
                </td>
                <td align="left">
                    <asp:FileUpload ID="file_Attachment" runat="server" /><asp:HiddenField ID="hid_Attachment"
                        runat="server" Value="" />
                </td>
            </tr>
            <tr>
                <td colspan="8">
                    <asp:Button ID="btn_Add" runat="server" CssClass="BlueButton_Min" Text="提交" OnClick="btn_Add_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="8">
                    <img src="image/mainpage_line.jpg" style="margin: 5px 0px 5px 0px;" />
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td align="right" style="padding-right: 4px">
                    <asp:Label ID="CalendarFrom" runat="server" Text="From"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_FromDate" runat="server" class="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                </td>
                <td align="right" style="padding-right: 4px">
                    <asp:Label ID="CalendarTo" runat="server" Text="To"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_ToDate" runat="server" class="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                </td>
                <td style="padding-right: 4px">
                    <asp:Button ID="btn_Search" runat="server" Text="查询" CssClass="BlueButton_Min" OnClick="btn_Search_Click" />
                </td>
                <td style="padding-right: 4px">
                    <asp:Button ID="btn_Export" runat="server" Text="导出" CssClass="BlueButton_Min" OnClick="btn_Export_Click" />
                </td>
                <td>
                    <asp:Button ID="btn_AddRole" runat="server" Text="添加" CssClass="BlueButton_Min" OnClientClick="showContentDiv(1);return false;" />
                </td>
            </tr>
        </table>
        <img src="image/mainpage_line.jpg" style="margin: 5px 0px 5px 0px;" />
        <asp:GridView ID="gv_PMS_ProjectMaintain" runat="server" AutoGenerateColumns="False"
            OnRowDataBound="gv_PMS_ProjectMaintain_RowDataBound" HeaderStyle-CssClass="GridHeader"
            CssClass="GridTable" HeaderStyle-Height="23px" Width="100%" ShowHeaderWhenEmpty="True"
            DataKeyNames="id" EmptyDataText="没有数据" EmptyDataRowStyle-CssClass="GridTableTDCenter"
            OnRowCommand="gv_PMS_ProjectMaintain_RowCommand">
            <Columns>
                <asp:BoundField DataField="quarter" HeaderText="季度安排" HeaderStyle-CssClass="GridHeader"
                    ItemStyle-CssClass="GridTableTD">
                    <HeaderStyle Width="10%" />
                    <ItemStyle Width="10%" />
                </asp:BoundField>
                <asp:BoundField DataField="planDate" HeaderText="计划日期" DataFormatString="{0:yyyy-MM-dd}"
                    HeaderStyle-CssClass="GridHeader" ItemStyle-CssClass="GridTableTDCenter">
                    <HeaderStyle Width="10%" />
                    <ItemStyle Width="10%" />
                </asp:BoundField>
                <asp:BoundField DataField="completeDate" HeaderText="完成日期" DataFormatString="{0:yyyy-MM-dd}"
                    HeaderStyle-CssClass="GridHeader" ItemStyle-CssClass="GridTableTDCenter">
                    <HeaderStyle Width="10%" />
                    <ItemStyle Width="10%" />
                </asp:BoundField>
                <asp:BoundField DataField="description" HeaderText="巡检结果" HeaderStyle-CssClass="GridHeader"
                    ItemStyle-CssClass="GridTableTD"></asp:BoundField>
                <asp:TemplateField HeaderText="附件" ShowHeader="False">
                    <ItemTemplate>
                        <asp:ImageButton ID="imgbtn_Attachment" runat="server" CausesValidation="False" ImageUrl="~/image/Upload.gif"
                            Text="附件" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="GridHeader" Width="5%" />
                    <ItemStyle CssClass="GridTableTDCenter" Width="5%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="编辑" ShowHeader="False">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Edited"
                            ImageUrl="~/image/Edit.gif" Text="编辑" CommandArgument='<%#Eval("id") %>' />
                    </ItemTemplate>
                    <HeaderStyle CssClass="GridHeader" Width="5%" />
                    <ItemStyle CssClass="GridTableTDCenter" Width="5%" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除" ShowHeader="False">
                    <ItemTemplate>
                        <asp:ImageButton ID="imabtn_Delete" runat="server" CausesValidation="False" CommandName="Del"
                            ImageUrl="~/image/Delete.gif" Text="删除" CommandArgument='<%#Eval("id") %>' OnClientClick="return confirm('确定删除?');" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="GridHeader" Width="5%" />
                    <ItemStyle CssClass="GridTableTDCenter" Width="5%" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
